import request from '@/utils/request'

// 创建积分等级
export function createScoreLevel(data) {
  return request({
    url: '/member/score-level/create',
    method: 'post',
    data: data
  })
}

// 更新积分等级
export function updateScoreLevel(data) {
  return request({
    url: '/member/score-level/update',
    method: 'put',
    data: data
  })
}

// 删除积分等级
export function deleteScoreLevel(id) {
  return request({
    url: '/member/score-level/delete?id=' + id,
    method: 'delete'
  })
}

// 获得积分等级
export function getScoreLevel(id) {
  return request({
    url: '/member/score-level/get?id=' + id,
    method: 'get'
  })
}

// 获得积分等级分页
export function getScoreLevelPage(query) {
  return request({
    url: '/member/score-level/page',
    method: 'get',
    params: query
  })
}

// 导出积分等级 Excel
export function exportScoreLevelExcel(query) {
  return request({
    url: '/member/score-level/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
